﻿ // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace Localization
{
    using System;

    using Windows.Globalization.DateTimeFormatting;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Navigation;

    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        #region Constructors and Destructors

        public MainPage()
        {
            this.InitializeComponent();
        }

        #endregion

        #region Methods

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">
        /// Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.
        /// </param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var dob = new DateTime(1948, 6, 30);
            DateTimeFormatter shortDateFormat = DateTimeFormatter.ShortDate;
            DateTimeFormatter longDateFormat = DateTimeFormatter.LongDate;
            //this.DoBText.Text = longDateFormat.Format(new DateTimeOffset(dob));

            // Get formatters for the date part and the time part.
            var mydate = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("month day");
            var mytime = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("hour minute");

            // Get the patterns from these formatters.
            var mydatepattern = mydate.Patterns[0];
            var mytimepattern = mytime.Patterns[0];
        }

        #endregion
    }
}